<template>
  <div class="home">
    <div class="banner">
      <h1>欢迎来到小米商城</h1>
      <p>发现科技新生活</p>
    </div>
    <div class="featured-products">
      <h2>热门商品</h2>
      <div class="product-grid">
        <!-- 示例商品 -->
        <div class="product-card" v-for="i in 4" :key="i">
          <div class="product-image"></div>
          <div class="product-info">
            <h3>小米手机</h3>
            <p class="price">¥1999</p>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Home'
}
</script>

<style scoped>
.home {
  padding: 20px;
}

.banner {
  text-align: center;
  padding: 60px 0;
  background-color: #f5f5f5;
  margin-bottom: 40px;
}

.banner h1 {
  font-size: 36px;
  color: #333;
  margin-bottom: 10px;
}

.banner p {
  font-size: 18px;
  color: #666;
}

.featured-products {
  max-width: 1226px;
  margin: 0 auto;
}

.featured-products h2 {
  font-size: 24px;
  color: #333;
  margin-bottom: 20px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.product-card {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-image {
  height: 200px;
  background-color: #f5f5f5;
  border-radius: 4px 4px 0 0;
}

.product-info {
  padding: 15px;
}

.product-info h3 {
  font-size: 16px;
  color: #333;
  margin-bottom: 10px;
}

.price {
  color: #ff6700;
  font-size: 18px;
  font-weight: bold;
}
</style> 